12. Exercise 3: Measuring Performance

Intro

Exercise 3: Measuring Performance

Now let’s get technical for a bit and take a crack at implementing algorithms for computing some of the performance metrics we have discussed. In the workspace below, you will find a Python file with instructions and a pair of NIFTI binary segmentation masks to compare.

Udacity Workspace Note: This workspace will include the ability to access a virtual desktop via the "Go to Desktop" button in which you will be able to access the Slicer tool - you can find a shortcut on the desktop.

Code

If you need a code on the https://github.com/udacity.

  • userCode:

    /root/miniconda3/bin/conda init bash > /dev/null
    grep -qxF "conda activate medai" /root/.bashrc || echo "conda activate medai" >> /root/.bashrc

  • Summary, Further Research, New Vocab Terms

    Congratulations on completing the exercise! We hope you enjoyed it. If you are feeling adventurous, you can do an optional activity: go back to Exercise 2 from this lesson and try to replace the cross-entropy loss function that we have used to train our UNet with a metric you have just implemented. See how your performance and time to train changes, especially if you add more slices into your “training set”.

    If you would like to explore the topic further, here is a paper with an excellent overview of various metrics for evaluation of 3D medical image segmentation: Taha AA, Hanbury A. Metrics for evaluating 3D medical image segmentation: analysis, selection, and tool. BMC Med Imaging. 2015;15:29. Published 2015 Aug 12. doi:10.1186/s12880-015-0068-x

    You can find the solution for the Exercise 3: Measuring Performance here.
    Note how the Dice score and statistical accuracy measures have quite elegant expression in Python code.